package com.xiyu.service.vo.files.agreement.baseVO;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import static com.xiyu.service.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
import java.time.LocalDateTime;

/**
 * 用房协议 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class FilesHousingAgreementBase {

    @Schema(description = "单位ID")
    private Long unitId;

    @Schema(description = "签订日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime signingDate;

    @Schema(description = "到期日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime expireDate;

    @Schema(description = "面积")
    @DecimalMax(value = "10000000000", message = "面积最大不能超过10000000000")
    private BigDecimal area;

    @Schema(description = "租金")
    @DecimalMax(value = "10000000000", message = "租金最大不能超过10000000000")
    private BigDecimal rent;

    @Schema(description = "备注")
    @Size(max = 255, message = "备注长度不能超过255")
    private String remark;

    @Schema(description = "附件URL")
    @Size(max = 1024, message = "附件长度不能超过1024")
    private String fileUrl;

    @Schema(description = "附件名")
    @Size(max = 255, message = "附件名长度不能超过255")
    private String fileName;

}
